﻿using System.Globalization;
using System.Windows.Data;

namespace Xioa_UI.Convert;

public class IntPxFileSizeConverter : IValueConverter
{
    public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        if (value is null) return "";
        if ((int)value == 0) return "";
        return ((int)value) + "px" + " * ";
    }

    public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}